abstract class Adder {
  abstract x: number
  abstract y: number

  abstract add(): number
  name: string = 'adder'
}

class CustomAdder extends Adder {
  x: number
  y: number

  constructor(x: number, y: number) {
    super()
    this.x = x
    this.y = y
  }

  add() {
    return this.x + this.y
  }

  addTwice() {
    return (this.x + this.y) *  2
  }
}

const adder = new CustomAdder(1,2)
console.log(adder.add(), adder.x, adder.y)
console.log(adder.name)
console.log(adder.addTwice())
